-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement IntentFactory (v1.0.0) #705
base: main
Are you sure you want to change the base?
Conversation
src/Helpers/Intent.sol
Outdated
/// @author LI.FI (https://li.fi) | ||
/// @notice Intent contract that can execute arbitrary calls. | ||
/// @custom:version 1.0.0 | ||
contract Intent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a big fan of the naming.
Would rather go for something like "IntentHandler" or anything that describes what this contract does with an intent. I find it misleading to call it an intent since it also does the handling of execution and withdrawal and not just represent an intent
import { TestToken } from "../utils/TestToken.sol"; | ||
import { TestAMM } from "../utils/TestAMM.sol"; | ||
|
||
contract IntentFactoryTest is Test { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am missing negative test cases in the file.
Stuff like "not anyone can execute / withdraw".
Or "cannot execute any other calldata".
Or "will fail if minAmount not reached"
If/once an event has been added to the Intent
contract this should be correctly caught here, too.
Which Jira task belongs to this PR?
LF-6656
Why did I implement it this way?
Checklist before requesting a review
Checklist for reviewer (DO NOT DEPLOY any contracts BEFORE CHECKING THIS!!!)